using System;
using System.Collections;
namespace APP.HELPER.Utils.Net
{
    public delegate void GetMailEventHander(object sender);
	public class MailMessage2
	{
		private ArrayList attachments;
		public event GetMailEventHander GetMailList;
		public string From
		{
			get;
			set;
		}
		public string To
		{
			get;
			set;
		}
		public string CC
		{
			get;
			set;
		}
		public string BCC
		{
			get;
			set;
		}
		public string Subject
		{
			get;
			set;
		}
		public string Message
		{
			get;
			set;
		}
		public MailEncodingType MailType
		{
			get;
			set;
		}
		public MailSendPriority MailPriority
		{
			get;
			set;
		}
		public ArrayList Attachments
		{
			get
			{
				return this.attachments;
			}
			set
			{
				this.attachments = value;
			}
		}
		public int AttachmentCount
		{
			get
			{
				return this.attachments.Count;
			}
		}
		public MailMessage2()
		{
			this.RaiseGetMailList();
			this.From = "";
			this.To = "";
			this.CC = "";
			this.BCC = "";
			this.Subject = "";
			this.Message = "";
			this.MailType = MailEncodingType.PLAINTEXT;
			this.MailPriority = MailSendPriority.NORMAL;
			this.attachments = new ArrayList();
		}
		public MailMessage2(string from, string recipient)
		{
			this.From = from;
			this.To = recipient;
			this.CC = "";
			this.BCC = "";
			this.Subject = "";
			this.Message = "";
			this.MailType = MailEncodingType.PLAINTEXT;
			this.MailPriority = MailSendPriority.NORMAL;
			this.attachments = new ArrayList();
		}
		public MailMessage2(string from, string recipient, string subject, string body)
		{
			this.From = from;
			this.To = recipient;
			this.CC = "";
			this.BCC = "";
			this.Subject = subject;
			this.Message = body;
			this.MailType = MailEncodingType.PLAINTEXT;
			this.MailPriority = MailSendPriority.NORMAL;
			this.attachments = new ArrayList();
		}
		private void RaiseGetMailList()
		{
			if (this.GetMailList != null)
			{
				this.GetMailList(this);
			}
		}
	}
}
